#pragma once

#include <map>
#include <memory>

class SCRGame;
class SCRTexture;
class SCRFont;
class SCRMusic;
class SCRSound;

typedef std::shared_ptr<SCRTexture> SCRTexturePtr;
typedef std::shared_ptr<SCRFont> SCRFontPtr;
typedef std::shared_ptr<SCRMusic> SCRMusicPtr;
typedef std::shared_ptr<SCRSound> SCRSoundPtr;
typedef std::map<unsigned int, SCRTexturePtr> SCRTexturePtrMap;
typedef std::map<unsigned int, SCRFontPtr> SCRFontPtrMap;
typedef std::map<unsigned int, SCRMusicPtr> SCRMusicPtrMap;
typedef std::map<unsigned int, SCRSoundPtr> SCRSoundPtrMap;

class SCRResourceManager
{
public:

	~SCRResourceManager();
	SCRTexturePtr GetTexture(const std::string& Filename, const bool& HasAlpha = false);
	SCRFontPtr GetFont(const std::string& Filename, const int& Size);
	SCRMusicPtr GetMusic(const std::string& Filename);
	SCRSoundPtr GetSound(const std::string& Filename);
	
	friend class SCRGame;

private:

	SCRResourceManager();

	SCRTexturePtrMap m_TextureMap;
	SCRFontPtrMap m_FontMap;
	SCRMusicPtrMap m_MusicMap;
	SCRSoundPtrMap m_SoundMap;
};
